$OpenBSD: patch-src_plcore_c,v 1.3 2009/04/05 16:21:55 steven Exp $
--- src/plcore.c.orig	Sun Nov 18 21:03:59 2007
+++ src/plcore.c	Fri May 23 21:10:35 2008
@@ -34,6 +34,8 @@
 
 #define DEBUG
 
+#include <sys/param.h>
+
 #define NEED_PLDEBUG
 #include "plcore.h"
 
@@ -2109,7 +2111,7 @@ int PLDLLIMPEXP plInBuildTree()
   static int inBuildTree = 0;
 
   if (inited == 0) {
-    char currdir[256];
+    char currdir[MAXPATHLEN];
 
 /* AM: getcwd has a somewhat strange status on Windows, its proper
    name is _getcwd, this is a problem in the case of DLLs, like with
@@ -2119,7 +2121,7 @@ int PLDLLIMPEXP plInBuildTree()
 #define getcwd _getcwd
 #endif
 
-    if (getcwd(currdir, 256) == NULL) {
+    if (getcwd(currdir, sizeof(currdir)) == NULL) {
       pldebug("plInBuildTree():", "Not enough buffer space");
     } else if (strncmp(BUILD_DIR, currdir, strlen(BUILD_DIR)) == 0)
       inBuildTree = 1;
